Foxit PDF RDK
FoxitRDKNative.Task Class Reference

Represents a task with various states and operations. More...

Inheritance diagram for FoxitRDKNative.Task:
FoxitRDKNative.CalcPageContentTask FoxitRDKNative.CalculateMaxSizeTask FoxitRDKNative.ClearCacheTask FoxitRDKNative.CloseDocumentTask FoxitRDKNative.CropPageSizeTask FoxitRDKNative.DrawPageTask FoxitRDKNative.EditCommentsTask FoxitRDKNative.EditFormTask FoxitRDKNative.OpenDocumentTask FoxitRDKNative.PageSizeTask FoxitRDKNative.SaveDocTask FoxitRDKNative.SearchPageTask

Public Member Functions

 canCancel ()
 Checks if the task can be cancelled. More...
 
 cancel ()
 Cancels the task. Attempts to cancel the task if it is in a cancellable state.
 
 constructor ()
 Constructor for the Task class. Initializes a new instance of the Task.
 
 errorCode ()
 Gets the error code of the task. More...
 
 exeSuccess ()
 Checks if the task was executed successfully. More...
 
 extErrorCode ()
 Gets the extended error code of the task. More...
 
 finish ()
 Marks the task as finished. Completes the task and performs any necessary cleanup.
 
 getPriority ()
 Gets the current priority of the task. More...
 
 getStatus ()
 Gets the current status of the task. More...
 
 isCanceled ()
 Checks if the task has been cancelled. More...
 
 isModify ()
 Checks if the task has been modified. More...
 
 notify (result)
 Notifies about the result of the js funcion. More...
 
 prepare ()
 Prepares the task for execution. Performs any necessary setup before the task can be run.
 
 setErrorCode (error)
 Sets the error code for the task. More...
 
 setPriority (priority)
 Sets the priority of the task. More...
 
 setStatus (status)
 Sets the status of the task. More...
 

Detailed Description

Represents a task with various states and operations.

Member Function Documentation

◆ canCancel()

FoxitRDKNative.Task.canCancel ( )

Checks if the task can be cancelled.

Returns
{boolean} True if the task can be cancelled; otherwise, false.

◆ errorCode()

FoxitRDKNative.Task.errorCode ( )

Gets the error code of the task.

Returns
{number} The current error code of the task.

◆ exeSuccess()

FoxitRDKNative.Task.exeSuccess ( )

Checks if the task was executed successfully.

Returns
{boolean} True if the task was successful; otherwise, false.

◆ extErrorCode()

FoxitRDKNative.Task.extErrorCode ( )

Gets the extended error code of the task.

Returns
{number} The extended error code, if any, of the task.

◆ getPriority()

FoxitRDKNative.Task.getPriority ( )

Gets the current priority of the task.

Returns
{number} The current priority level of the task.

◆ getStatus()

FoxitRDKNative.Task.getStatus ( )

Gets the current status of the task.

Returns
{number} The current status of the task.

◆ isCanceled()

FoxitRDKNative.Task.isCanceled ( )

Checks if the task has been cancelled.

Returns
{boolean} True if the task has been cancelled; otherwise, false.

◆ isModify()

FoxitRDKNative.Task.isModify ( )

Checks if the task has been modified.

Returns
{boolean} True if the task has been modified; otherwise, false.

◆ notify()

FoxitRDKNative.Task.notify ( result  )

Notifies about the result of the js funcion.

Parameters
{boolean}result - The result to be notified, such as success or failure.

◆ setErrorCode()

FoxitRDKNative.Task.setErrorCode ( error  )

Sets the error code for the task.

Parameters
{number}error - The error code to be set for the task.

◆ setPriority()

FoxitRDKNative.Task.setPriority ( priority  )

Sets the priority of the task.

Parameters
{number}priority - The new priority level for the task.

◆ setStatus()

FoxitRDKNative.Task.setStatus ( status  )

Sets the status of the task.

Parameters
{number}status - The new status to be set for the task.